<?
require("includes/constants.php");
require("includes/selectLanguage.php");
require("includes/funciones.inc.php");

session_start();
if(!isset($_SESSION['userName']))
	exit();

?>
<!-- Script Tables Form -->
<script src="js/reports.js" type="text/javascript"></script>

<div id="main">
	<div id="contenido">
		<div id="contHead">
			<div id="tituloSec"><?=$a_languages["Report.Title"];?></div>
		</div>
		<button class="itmIngBtn" id="btnActiveTables" ><?=$a_languages["Report.btnActiveTables"];?></button>
		<button class="itmIngBtn" id="btnRankingTable" ><?=$a_languages["Report.btnRankingTable"];?></button>
		<button class="itmIngBtn" id="btnRakingFoods"><?=$a_languages["Report.btnRakingFoods"];?></button>
		<button class="itmIngBtn" id="btnTimeTables"><?=$a_languages["Report.btnTimeTables"];?></button>
		
		<p>
			<label class="labelFilter"><?=$a_languages["Report.Dates"];?>:</label>
			<input type="text" id="sDateFrom" size="7" /> - 
			<input type="text" id="sDateTo" size="7" />
		</p>
		<?if($_SESSION['userType'] == $idTypeAdministrator){?>
			<p>
				<label class="labelRestaurant"><?=$a_languages["Report.Restaurant"];?>:</label>
				<select id="cmbRestaurant" name="cmbRestaurant"></select>
			</p>
		<?}?>
		<!-- REPORT ACTIVE TABLE -->
		<div id="activeTables" style="display: none;">
			<table id="dt_activeTables" class="display">
				<thead>
					<tr>
						<th><?=$a_languages["Report.ActiveTables.Date"];?></th>
						<th><?=$a_languages["Report.ActiveTables.Table"];?></th>
						<th><?=$a_languages["Report.ActiveTables.Count"];?></th>
					</tr>
			    </thead>
			    <tbody>
			    	<td colspan="3" class="dataTables_empty"><?=$a_languages["Common.LoadingData"];?></td>
				</tbody>
			</table>
			<button class="itmIngBtn" id="btnSearchActiveTable"><?=$a_languages["Report.btnSearch"];?></button>
		</div>
		
		<!-- REPORT RANKING TABLE -->
		<div id="rankingTables" style="display: none;">
			<table id="dt_rankingTables" class="display">
				<thead>
					<tr>
						<th><?=$a_languages["Report.RankingTables.Date"];?></th>
						<th><?=$a_languages["Report.RankingTables.Table"];?></th>
						<th><?=$a_languages["Report.RankingTables.ConsumptionTable"];?></th>
					</tr>
			    </thead>
			    <tbody>
			    	<td colspan="3" class="dataTables_empty"><?=$a_languages["Common.LoadingData"];?></td>
				</tbody>
			</table>
			<button class="itmIngBtn" id="btnSearchRankingTable"><?=$a_languages["Report.btnSearch"];?></button>
		</div>
		
		<!-- REPORT RANKING FOODS -->
		<div id="rankingFoods" style="display: none;">
			<table id="dt_rankingFoods" class="display">
				<thead>
					<tr>
						<th><?=$a_languages["Report.RankingFoods.Date"];?></th>
						<th><?=$a_languages["Report.RankingFoods.Food"];?></th>
						<th><?=$a_languages["Report.RankingFoods.Count"];?></th>
					</tr>
			    </thead>
			    <tbody>
			    	<td colspan="3" class="dataTables_empty"><?=$a_languages["Common.LoadingData"];?></td>
				</tbody>
			</table>
			<button class="itmIngBtn" id="btnSearchRankingFoods"><?=$a_languages["Report.btnSearch"];?></button>
		</div>
		
		<!-- REPORT TIME TABLES -->
		<div id="timeTable" style="display: none;">
			<table id="dt_timeTable" class="display">
				<thead>
					<tr>
						<th><?=$a_languages["Report.TimeTable.Date"];?></th>
						<th><?=$a_languages["Report.TimeTable.Table"];?></th>
						<th><?=$a_languages["Report.TimeTable.MinTime"];?></th>
						<th><?=$a_languages["Report.TimeTable.MaxTime"];?></th>
					</tr>
			    </thead>
			    <tbody>
			    	<td colspan="3" class="dataTables_empty"><?=$a_languages["Common.LoadingData"];?></td>
				</tbody>
			</table>
			<button class="itmIngBtn" id="btnSearchTimeTable"><?=$a_languages["Report.btnSearch"];?></button>
		</div>
	</div>
</div>

<script>
	$_init();
</script>